\(\int \frac {1}{\sqrt {1-a x} (1+a x)} \, dx\) [928]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 27 \[ \int \frac {1}{\sqrt {1-a x} (1+a x)} \, dx=-\frac {\sqrt {2} \text {arctanh}\left (\frac {\sqrt {1-a x}}{\sqrt {2}}\right )}{a} \]

[Out]

-arctanh(1/2*(-a*x+1)^(1/2)*2^(1/2))*2^(1/2)/a

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {65, 212} \[ \int \frac {1}{\sqrt {1-a x} (1+a x)} \, dx=-\frac {\sqrt {2} \text {arctanh}\left (\frac {\sqrt {1-a x}}{\sqrt {2}}\right )}{a} \]

[In]

Int[1/(Sqrt[1 - a*x]*(1 + a*x)),x]

[Out]

-((Sqrt[2]*ArcTanh[Sqrt[1 - a*x]/Sqrt[2]])/a)

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps \begin{align*} \text {integral}& = -\frac {2 \text {Subst}\left (\int \frac {1}{2-x^2} \, dx,x,\sqrt {1-a x}\right )}{a} \\ & = -\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {1-a x}}{\sqrt {2}}\right )}{a} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\sqrt {1-a x} (1+a x)} \, dx=-\frac {\sqrt {2} \text {arctanh}\left (\frac {\sqrt {1-a x}}{\sqrt {2}}\right )}{a} \]

[In]

Integrate[1/(Sqrt[1 - a*x]*(1 + a*x)),x]

[Out]

-((Sqrt[2]*ArcTanh[Sqrt[1 - a*x]/Sqrt[2]])/a)

Maple [A] (verified)

Time = 2.20 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.85

method result size
derivativedivides \(-\frac {\operatorname {arctanh}\left (\frac {\sqrt {-a x +1}\, \sqrt {2}}{2}\right ) \sqrt {2}}{a}\) \(23\)
default \(-\frac {\operatorname {arctanh}\left (\frac {\sqrt {-a x +1}\, \sqrt {2}}{2}\right ) \sqrt {2}}{a}\) \(23\)
pseudoelliptic \(-\frac {\operatorname {arctanh}\left (\frac {\sqrt {-a x +1}\, \sqrt {2}}{2}\right ) \sqrt {2}}{a}\) \(23\)

[In]

int(1/(a*x+1)/(-a*x+1)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-arctanh(1/2*(-a*x+1)^(1/2)*2^(1/2))*2^(1/2)/a

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.30 \[ \int \frac {1}{\sqrt {1-a x} (1+a x)} \, dx=\frac {\sqrt {2} \log \left (\frac {a x + 2 \, \sqrt {2} \sqrt {-a x + 1} - 3}{a x + 1}\right )}{2 \, a} \]

[In]

integrate(1/(a*x+1)/(-a*x+1)^(1/2),x, algorithm="fricas")

[Out]

1/2*sqrt(2)*log((a*x + 2*sqrt(2)*sqrt(-a*x + 1) - 3)/(a*x + 1))/a

Sympy [A] (verification not implemented)

Time = 1.26 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.78 \[ \int \frac {1}{\sqrt {1-a x} (1+a x)} \, dx=\begin {cases} \frac {\sqrt {2} \left (\log {\left (\sqrt {- a x + 1} - \sqrt {2} \right )} - \log {\left (\sqrt {- a x + 1} + \sqrt {2} \right )}\right )}{2 a} & \text {for}\: a \neq 0 \\\begin {cases} x & \text {for}\: a = 0 \\\frac {\log {\left (a x + 1 \right )}}{a} & \text {otherwise} \end {cases} & \text {otherwise} \end {cases} \]

[In]

integrate(1/(a*x+1)/(-a*x+1)**(1/2),x)

[Out]

Piecewise((sqrt(2)*(log(sqrt(-a*x + 1) - sqrt(2)) - log(sqrt(-a*x + 1) + sqrt(2)))/(2*a), Ne(a, 0)), (Piecewis
e((x, Eq(a, 0)), (log(a*x + 1)/a, True)), True))

Maxima [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.44 \[ \int \frac {1}{\sqrt {1-a x} (1+a x)} \, dx=\frac {\sqrt {2} \log \left (-\frac {\sqrt {2} - \sqrt {-a x + 1}}{\sqrt {2} + \sqrt {-a x + 1}}\right )}{2 \, a} \]

[In]

integrate(1/(a*x+1)/(-a*x+1)^(1/2),x, algorithm="maxima")

[Out]

1/2*sqrt(2)*log(-(sqrt(2) - sqrt(-a*x + 1))/(sqrt(2) + sqrt(-a*x + 1)))/a

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.56 \[ \int \frac {1}{\sqrt {1-a x} (1+a x)} \, dx=\frac {\sqrt {2} \log \left (\frac {{\left | -2 \, \sqrt {2} + 2 \, \sqrt {-a x + 1} \right |}}{2 \, {\left (\sqrt {2} + \sqrt {-a x + 1}\right )}}\right )}{2 \, a} \]

[In]

integrate(1/(a*x+1)/(-a*x+1)^(1/2),x, algorithm="giac")

[Out]

1/2*sqrt(2)*log(1/2*abs(-2*sqrt(2) + 2*sqrt(-a*x + 1))/(sqrt(2) + sqrt(-a*x + 1)))/a

Mupad [B] (verification not implemented)

Time = 10.19 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.70 \[ \int \frac {1}{\sqrt {1-a x} (1+a x)} \, dx=-\frac {\sqrt {2}\,\mathrm {atanh}\left (\frac {\sqrt {2-2\,a\,x}}{2}\right )}{a} \]

[In]

int(1/((1 - a*x)^(1/2)*(a*x + 1)),x)

[Out]

-(2^(1/2)*atanh((2 - 2*a*x)^(1/2)/2))/a